<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<html>
<head>
<style type="text/css">
</style>
</head>

<body>
	<div>
		<form action="comment" method="post">
			评论:<br> 
			<input type="text" name="content" placeholder="请文明发言，字数不超过20个"> <span style="color:red"><%=(request.getAttribute("msg")==null)?"":request.getAttribute("msg") %></span>
			<br><input type="submit" value="提交">
		</form>
	</div>
	<div>
		<h3>评论显示区</h3>
		<ul>
			<%	
			List<String> comments = (List<String>)request.getAttribute("comments");
			if(comments==null){
			%>
			<li>不发表评论不让看0.0</li>
			<%
			}else{
				for (int i = 0; i < comments.size(); i++) {
				%>
			    <li><%=i+1 %>楼:<%=comments.get(i)%></li>
			    <%
				}
			}
			%>
		</ul>
	</div>
</body>

</html>